<?php
/* @var $this UserAdminController */
/* @var $model User */
/* @var $form CActiveForm */
?>
<div class="row-fluid sortable">
	<div class="box span12">
		<div class="box-header well" data-original-title>
			<h2>
				<i class="icon-edit">
				</i>
				Tìm kiếm
			</h2>
			<div class="box-icon">
				<?php
                    FormHelper::getBoxIcon();	
                ?>
			</div>
		</div>
		<div class="box-content">
			<?php $form=$this->beginWidget('CActiveForm', array(
            	'action'=>Yii::app()->createUrl($this->route),
            	'method'=>'get',
                'htmlOptions'=>array(
                    'class'=>'form-horizontal',
                ),
            )); ?>
				<fieldset>
					<div class="control-group">
                        <?php echo $form->label($model,'user_id',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
							<?php echo $form->textField($model,'user_id',FormHelper::setClass('textField')); ?>
                        </div>
					</div>
                    <div class="control-group">
						<?php echo $form->label($model,'email',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
                            <?php echo $form->textField($model,'email',FormHelper::setClass('textField')); ?>
						</div>
					</div>
		            <div class="control-group">
                        <?php echo $form->label($model,'firstname',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
							<?php echo $form->textField($model,'firstname',FormHelper::setClass('textField')); ?>
                        </div>
					</div>
                    <div class="control-group">
                        <?php echo $form->label($model,'lastname',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
							<?php echo $form->textField($model,'lastname',FormHelper::setClass('textField')); ?>
                        </div>
					</div>
                    <div class="control-group">
                        <?php echo $form->label($model,'gender',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
							<?php echo $form->dropDownList($model,'gender',array('Nữ','Nam'),array('prompt'=>' -- Chọn giới tính -- ')); ?>
                        </div>
					</div>
                    <div class="control-group">
                        <?php
                        	$model->birthday=strtotime($model->birthday);
                        ?>
                        <?php echo $form->label($model,'birthday',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
							<?php echo $form->textField($model,'birthday',FormHelper::setClass('textFieldDate')); ?>
                        </div>
					</div>
                    <div class="control-group">
                        <?php echo $form->label($model,'passport',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
							<?php echo $form->textField($model,'passport',FormHelper::setClass('textField')); ?>
                        </div>
					</div>
                    <div class="control-group">
                        <?php echo $form->label($model,'address',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
							<?php echo $form->textField($model,'address',FormHelper::setClass('textField')); ?>
                        </div>
					</div>
                    <div class="control-group">
                        <?php echo $form->label($model,'city',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
							<?php echo $form->dropDownList($model,'city',CHtml::listData(City::model()->findAll(),'city_id','city_name'),array('empty'=>'-- Chọn tỉnh thành --',));?>
                        </div>
					</div>
                    <div class="control-group">
                        <?php echo $form->label($model,'mobile',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
							<?php echo $form->textField($model,'mobile',FormHelper::setClass('textField')); ?>
                        </div>
					</div>
                    <div class="control-group">
                        <?php echo $form->label($model,'status',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
							<?php echo $form->dropDownList($model,'status',array('Không hoạt động','Hoạt động'),array('prompt'=>' -- Chọn trạng thái -- ')); ?>
                        </div>
					</div>
                    <div class="control-group">
                        <?php echo $form->label($model,'permission',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
							<?php echo $form->checkBoxList($model,'permission',CHtml::listData(Permission::model()->findAll(),'permission_id','permission_name'),array('labelOptions'=>array('style'=>'display:inline;width:150px;'))); ?>
                        </div>
					</div>
                    <div class="control-group">
                        <?php echo $form->label($model,'signup',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
							<?php echo $form->textField($model,'signup',array('class'=>'input-xlarge datepicker','id'=>'date03')); ?>
                        </div>
					</div>
                    <div class="control-group">
                        <?php echo $form->label($model,'lastlogin',FormHelper::setClass('labelEx')); ?>
						<div class="controls">
							<?php echo $form->textField($model,'lastlogin',array('class'=>'input-xlarge datepicker','id'=>'date02')); ?>
                        </div>
					</div>
					<div class="form-actions">
						<?php echo CHtml::submitButton('Tìm kiếm',FormHelper::setClass('submitButton')); ?>
					</div>
				</fieldset>
			<?php $this->endWidget(); ?>
		</div>
	</div>
	<!--/span-->
</div>